import { request } from "@/utils/request";

export const getAdminOrderList = (params) => {
  return request({
    url: "/order/page",
    method: "GET",
    params,
  });
};

export const addOrder = (order) => {
  return request({
    url: "/order/addOrder",
    method: "POST",
    data: order,
  });
};

export const orderTrack = (orderId) => {
  return request({
    url: "/order/track",
    method: "get",
    params: { orderId },
  });
};

export const orderRemoveAll = (ids) => {
  return request({
    url: "/order/removeAll",
    method: "get",
    params: { ids },
  });
};

export const orderUpdateOrder = (data) => {
  return request({
    url: "/order/updateOrder",
    method: "POST",
    data,
  });
};

export const orderMyOrderPage = (params) => {
  return request({
    url: "/order/myOrderPage",
    method: "GET",
    params,
  });
};

export const orderCheck = (ids) => {
  return request({
    url: "/order/check",
    method: "GET",
    params: { ids },
  });
};

export const orderQueryById = (orderId) => {
  return request({
    url: "/order/queryById",
    method: "GET",
    params: { orderId },
  });
};

export const orderDetail = (orderId) => {
  return request({
    url: "/order/orderDetail",
    method: "GET",
    params: { orderId },
  });
};
